package com.uex.dev.manage.admin.vo.device;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.uex.dev.manage.admin.po.ModelUhubPO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author lzs
 * @create 2024/03/06
 * @description
 */
@Schema(description = "云盾能力信息")
@Data
@JsonIgnoreProperties(value = {"deviceToken"}, allowSetters = true)
public class UhubInfo {
    @Schema(description = "设备Id")
    private Integer deviceId;
    @Schema(description = "设备类型ID")
    private Integer modelId;
    @Schema(description = "设备唯一标识")
    private String deviceToken;
    @Schema(description = "设备型号")
    private String deviceModel;
    @Schema(description = "端口数量")
    private Integer devicePortNum;
    @Schema(description = "按键精灵数量")
    private Integer deviceUkeyNum;

    public UhubInfo fromPO(ModelUhubPO modelUhubPO) {
        UhubInfo uhubInfo = new UhubInfo();
        BeanUtils.copyProperties(modelUhubPO, uhubInfo);
        return uhubInfo;
    }

    public ModelUhubPO toModelUhubPO() {
        ModelUhubPO modelUhub = new ModelUhubPO();
        BeanUtils.copyProperties(this, modelUhub);
        return modelUhub;
    }
}

